package com.lanyun.carworld.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.lanyun.carworld.model.dto.user.ChangePasswordRequest;
import com.lanyun.carworld.model.dto.user.UserLoginRequest;
import com.lanyun.carworld.model.dto.user.UserRegisterRequest;
import com.lanyun.carworld.model.dto.user.UserSearchRequest;
import com.lanyun.carworld.model.entity.User;
import com.lanyun.carworld.model.vo.LoginUserVO;
import com.lanyun.carworld.model.vo.UserVO;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;

/**
* @author 29074
* @description 针对表【user(用户)】的数据库操作Service
* @createDate 2024-06-11 15:22:43
*/
public interface UserService extends IService<User> {

    /**
     * 用户注册
     * @param request
     * @return
     */
    Boolean userRegister(UserRegisterRequest request);


    /**
     * 用户登录
     * @param request
     * @return
     */
    LoginUserVO userLogin(UserLoginRequest request);

    /**
     * 获取用户信息
     * @return
     */
    UserVO getUserInfo();


    /**
     * 更新用户信息
     * @param userVO
     * @return
     */
    Boolean updateUserInfo(UserVO userVO);

    /**
     * 确定账号和密码是否正确
     * @param request
     * @return
     */
    Boolean predefinePassword(UserLoginRequest request);


    /**
     * 修改密码
     * @param request
     * @return
     */
    Boolean modifyPassword(ChangePasswordRequest request);


    /**
     * 根据搜索学号获取用户列表
     * @param request
     * @return
     */
    List<UserVO> getUserList(UserSearchRequest request);
}
